package com.hps.demo.controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

/**
 * @author heps
 * @date 2019/11/23 16:58
 */
@RestController
@RequestMapping("/api/order")
public class OrderController {

    @GetMapping("/{id}")
    public Map<String, Object> getOrder(@PathVariable(("id")) Long id) {
        Map<String, Object> orderMap = new HashMap<>();
        orderMap.put("id", id);
        orderMap.put("desc", "Order items");
        return orderMap;
    }
}
